const Service = require('egg').Service;
 
class UserService extends Service {
  // 根据id查询用户信息
  async getUserById(id) {
    return await this.app.mysql.get('users', { id: id });
  }
  // 根据账号查询用户
  async findByAccount(account) {
    return await this.app.mysql.get('users', { account: account })
  }
}
 
module.exports = UserService;
